import { createApp, App as VueApp } from "vue";
import ElementPlus from "element-plus";
import type { ConfigProviderProps } from "element-plus";
import { createPinia } from "pinia";
import "element-plus/es/components/message/style/css";
import "element-plus/dist/index.css"
import App from "./App.vue";
import router from "./router/router";

import request from "./utils/request";
import api from "./utils/api";
import confirm from "./utils/confirm";
import message from "./utils/message";

const app: VueApp = createApp(App);

const elementPlusConfig: Partial<ConfigProviderProps> = {
  size: "default",
  zIndex: 3000,
};

app.use(router);
app.use(createPinia());
app.use(ElementPlus, elementPlusConfig);

app.config.globalProperties.request = request;
app.config.globalProperties.message = message;
app.config.globalProperties.api = api;
app.config.globalProperties.confirm = confirm;

app.mount("#app");
